serializeConfig
fun <T : Any> serializeConfig(config: T, errorBuilder: MutableList<String>, flags: Byte = 1): String
Serializes a config class to a string.
Extension of serializeToToml that takes the additional step of encoding to string. Use to write to a file or packet.
Return
Returns a TomlElement of the serialized config
Author
fzzyhmstrs
Since
0.2.0
Parameters
T
Type of the config to serialize. Can be any Non-Null type.
config
the config instance to serialize from
errorBuilder
the error list. error messages are appended to this for display after the serialization call
ignoreNonSync
default true. If false, elements with the NonSync annotation will be skipped. Use true to serialize the entire config (ex: saving to file), use false for syncing (ex: initial sync server -> client)